﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace RoketPack
{
    public partial class ConfirmationForm : Form
    {
        public ConfirmationForm(string repo, string app, string component, bool uninstall)
        {
            InitializeComponent();

            this.c_RepositoryNameFieldLabel.Text = repo;
            this.c_ApplicationNameFieldLabel.Text = app;
            this.c_ComponentNameFieldLabel.Text = component;

            if (uninstall)
            {
                this.c_RequestLabel.Text = "A request has been recieved to uninstall the following component on the local computer:";
                this.c_AreYouSureLabel.Text = "Do you want to uninstall the specified component?";
                this.c_YesButton.Text = "Yes, Uninstall";
            }
        }

        private void c_YesButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Yes;
            this.Close();
        }

        private void c_NoButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.No;
            this.Close();
        }
    }
}
